import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// const backendUrl = 'http://192.168.0.231:8081';

// https://vitejs.dev/config/
export default defineConfig({
  base: '',
  plugins: [vue()],
  define: {
    'process.env': {},
    'BACKEND_URL': {},
  },
  server: {
    port: 8081,
    host: '192.168.0.230',
    proxy: {
      '/api': {
        target: 'http://192.168.0.231:8081',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})
